#ifndef LAME_MP3_ENCODER_H
#define LAME_MP3_ENCODER_H

#include <stdio.h>
#include "lame.h"
#include "android/log.h"

#define TAG "MP3_LAME"
#define LOGI(...)  __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__)
#define LOGE(...)  __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__)

class Mp3Encoder {
private:
    int pcm_sample_rate;
    int pcm_channels;
    int pcm_bit_depth;

    FILE* pcmFile;
    FILE* mp3File;
    lame_t lameClient;
public:
    Mp3Encoder();
    ~Mp3Encoder();
    int Init(const char* pcmFilePath, const char *mp3FilePath, int sampleRate, int channels, int bitDepth);
    int Encode();
    void Destroy();
};

#endif /* LAME_MP3_ENCODER_H */

